@file:Suppress("unused")

package com.example.demo.model.blog

import xyz.erupt.annotation.*
import xyz.erupt.annotation.sub_field.*
import xyz.erupt.jpa.model.*
import javax.persistence.*

@Erupt(name = "友情链接", orderBy = "sort")
@Table(name = "blog_link")
@Entity
class FriendlyLink : BaseModel() {

    @EruptField(
        views = [View(title = "友链名")],
        edit = Edit(title = "友链名", notNull = true),
    )
    var name: String = ""

    @EruptField(
        views = [View(title = "友链简介")],
        edit = Edit(title = "友链简介", notNull = true),
    )
    var remark: String = ""

    @EruptField(
        views = [View(title = "友链URL", type = ViewType.LINK_DIALOG)],
        edit = Edit(title = "友链URL", notNull = true),
    )
    var url: String = ""

    @EruptField(
        views = [View(title = "站长邮箱")],
        edit = Edit(title = "站长邮箱"),
    )
    var email: String? = null

    @EruptField(
        views = [View(title = "排序")],
        edit = Edit(title = "排序"),
    )
    var sort: Int = 0

}